/*
 * IR_sensor.h
 *
 * Created: 11/10/2013 2:48:56 PM
 *  Author: Daniel
 */ 

/*  initializes the ADC
*   initializes the ADMUX and ADCSRA. also set ADMUX to read from channel two.
*/
void ADC_init(void); 

/*		gets an ADC
*       starts ADC sampling then waits till completion
*		Return The value of ADCW
*/
unsigned int ADC_read(int channel);

/*	calculates the distance using the ADC reading
*	it decides what the IR distance is by the returned value from ADC_read. 
	Which is ran through 50 case statement to decide the distance
*   return distance
*/
unsigned int IR_cal(void);